package com.note.chh.notebook.Adapter;

import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.note.chh.notebook.Model.NetMusicTypeModel;
import com.note.chh.notebook.R;

/**
 * Created by caihuahui on 2018/3/28.
 */

public class RankAdapter extends BaseQuickAdapter<NetMusicTypeModel.RankBean.ListBean,BaseViewHolder> {
    public RankAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, NetMusicTypeModel.RankBean.ListBean item) {
        ImageView mImage_rank = helper.getView(R.id.mImage_rank);

        Glide.with(mContext).load(item.getImgurl().replace("{size}","")).into(mImage_rank);

        helper.setText(R.id.mText_rank,item.getRankname());
    }
}
